import request from '@/config/axios'
/**
 * 分页查询服务器
 */
export const pageQuery = (params) => {
  return request.get({ url: '/infra/devops/server/page-query', params })
}

/**
 * 新增服务器
 */
export const create = (data) => {
  return request.post({ url: '/infra/devops/server/create', data })
}

/**
 * 更新服务器
 */
export const update = (data) => {
  return request.put({ url: '/infra/devops/server/update', data })
}

/**
 * 删除服务器
 */
export const deleted = (id) => {
  return request.delete({ url: '/infra/devops/server/deleted?id=' + id })
}

/**
 * 获取单个服务器
 */
export const singleGet = (id) => {
  return request.get({ url: '/infra/devops/server/single-get?id=' + id })
}

/**
 * 查询服务器
 */
export const listQuery = () => {
  return request.get({ url: '/infra/devops/server/list-query' })
}
